# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Simon Zeni <simon@bl4ckb0ne.ca>
pkgname=vkd3d
pkgver=1.4
pkgrel=0
pkgdesc="Direct3D 12 to Vulkan translation library"
url="https://www.winehq.org"
arch="all !s390x" # test failures on big-endian
license="LGPL-2.1-or-later"
options="!check" # tests require a vulkan driver
makedepends="vulkan-headers vulkan-loader-dev spirv-tools-dev libxcb-dev
	xcb-util-keysyms-dev flex bison"
subpackages="$pkgname-static $pkgname-dev"
source="https://dl.winehq.org/vkd3d/source/vkd3d-$pkgver.tar.xz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--with-xcb \
		--with-spirv-tools
	make
}

check() {
	VKD3D_TEST_FILTER=clear_render_target make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
58535b57b0b506542f2867e9b1229682f012216b9f8913d2692d4ed64a8113248d66ea710127ec2064baf9511b7f2be7b757dffcaf95a43168d781010d007ddb  vkd3d-1.4.tar.xz
"
